package com.ffcs.trino.config;

import com.ffcs.trino.service.TrinoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author zhangzhengxing
 */
@Component
@Slf4j
@RequiredArgsConstructor
public class DataLoader implements CommandLineRunner {

  private final TrinoService trinoService;

  @Override
  public void run(String... args) {
    log.info("数据初始化执行trino启动脚本");
    trinoService.executeSh();
  }
}